package context.event;

import java.util.Observable;
import java.util.Observer;

/**
 * Created by Stimd
 * 项目地址：https://gitee.com/stimd/spring-wheel
 * 公众号：Java编程探微
 */
public class MilkObserver implements Observer {
    private String name;

    public MilkObserver(String name) {
        this.name = name;
    }

    @Override
    public void update(Observable o, Object arg) {
        System.out.println(this.name + " 喝 " + arg);
    }
}
